<?php
   header('Content-Type:text/html;charset=utf-8');
   //第一 二步
   $mylink=new mysqli('localhost','root','','demo','3306');
   if($mylink->connect_errno){
   //输出错误代码并退出当前脚本
   die("连接失败：%s\n".$mylink->connect_error);
   }

   $mylink->query("set names utf8");
